<%
    /**
     * 作废然后新增一条记录得修改页面
     *
     * author: amon lei
     */
%>
<%@ include file = "/common/ini.jsp"%> 
<%@ include file = "/common/_log4j.jsp"%> 
<%@ include file = "/common/_ApplicationContext_init.jsp"%> 
<%@ include file = "/common/_vr.jsp"%> 
<%
    // 定义名称
    String title = "修改实体名";
    ModelNameManager modelNameManager = (ModelNameManager)applicationContext.getBean("modelNameManager");
    ModelName modelName = (ModelName)modelNameManager.get(request.getParameter("id"));
%>
<script>
    function submitData()
    {
        detailForm.serviceURL.value = "modulename.modelname.BlankOutThenSaveModelNameService";
        detailForm.submit();
    }
    function reset()
    {
        <%
        String remark = "";
        if(vr.isAllValidated())    
        {
            %>
            detailForm.id.value = "<%= modelName.getId()%>";
            detailForm.name.value = "<%= modelName.getName()%>";
            detailForm.type.value = "<%= modelName.getType()%>";
            detailForm.parentId.value = "<% if(modelName.getSuperModelName() != null) out.print(modelName.getSuperModelName().getId());%>";
            detailForm.remark.value = tempRemark.value;
            <%
            remark = modelName.getRemark();
        }
        else
        {
            %>
            detailForm.id.value = "<%= request.getParameter("id")%>";
            detailForm.name.value = "<%= request.getParameter("name")%>";
            detailForm.type.value = "<%= request.getParameter("type")%>";
            detailForm.parentId.value = "<%= request.getParameter("parentId")%>";
            detailForm.remark.value = tempRemark.value;
            <%
            remark = request.getParameter("remark");
        }    
        %>
    }
</script>
<%@ include file = "/common/detail/_OnForm.jsp"%> 
<%@ include file = "_detail.jsp"%> 
<%@ include file = "/common/detail/_UnderForm.jsp"%> 
